package com.knight.sychronized.lock;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class ReentrantLockTest {


    public static void main(String[] args) {
        Lock lock = new ReentrantLock();
        Thread t1 = new Thread(new ThreadA(lock), "t1");
        Thread t0 = new Thread(new ThreadA(lock), "t0");
        Thread t2 = new Thread(new ThreadA(lock), "t2");
        Thread t3 = new Thread(new ThreadA(lock), "t3");
        Thread t4 = new Thread(new ThreadA(lock), "t4");
        t0.start();
        t1.start();
        t2.start();
        t3.start();
        t4.start();
    }
}
